import request from './request'

//登录
export function login(params) {
    return request(`api/sysUser/login`, 'post', params || {})
}
//退出登录
export function logOut(params) {
    return request(`api/sysUser/quitLogin`, 'get', params || {})
}

//获取菜单
export function getMenu(params) {
    return request(`api/menu/byRole`, 'get', params || {})
}

//用户查询
export function getUsers(params) {
    return request(`api/sysUser/page`, 'get', params || {})
}

//查询角色
export function getRoles(params) {
    return request(`api/sysUser/roleList`, 'get', params || {})
}

//重置密码
export function resetPass(params) {
    return request(`api/sysUser/resetPassword`, 'get', params || {})
}

//新增用户
export function addUser(params) {
    return request(`api/sysUser/register`, 'post', params || {})
}
//用户详情
export function getUserDetail(params) {
    return request(`api/sysUser/selectById`, 'get', params || {})
}

//用户编辑
export function editUser(params) {
    return request(`api/sysUser/update`, 'post', params || {})
}

//删除用户
export function delUser(params) {
    return request(`api/sysUser/delete`, 'get', params || {})
}

//修改密码
export function setPass(params) {
    return request(`api/sysUser/updatePassword`, 'post', params || {})
}

//查询线缆
export function getCable(params) {
    return request(`api/cableType/page`, 'get', params || {})
}

//新增线缆
export function addCable(params) {
    return request(`api/cableType/add`, 'post', params || {})
}

//删除线缆
export function delCable(params) {
    return request(`api/cableType/delete`, 'get', params || {})
}

//编辑线缆
export function editCable(params) {
    return request(`api/cableType/update`, 'post', params || {})
}

//线缆详情
export function getDataDetail(params) {
    return request(`api/cableType/getOne`, 'get', params || {})
}

//用户登录日志
export function getUserLog(params) {
    return request(`api/loginLog/page`, 'get', params || {})
}
//系统异常日志
export function getSysLog(params) {
    return request(`api/exceptionLog/page`, 'get', params || {})
}

//称重记录查询
export function getWeight(params) {
    return request(`api/weighingRecord/page`, 'get', params || {})
}

//删除称重记录
export function delWeight(params) {
    return request(`api/weighingRecord/deleteById`, 'get', params || {})
}

//线缆类型下拉数据
export function getClassPullDown(params) {
    return request(`api/cableType/classInfo`, 'get', params || {})
}
//根据线缆类型查询规格型号
export function getModelByclass(params) {
    return request(`api/cableType/modelByclass`, 'get', params || {})
}

//称重记录添加
export function addWeighingRecord(params) {
    return request(`api/weighingRecord/add`, 'post', params || {})
}
//称重记录详情
export function getWeightDetail(params) {
    return request(`api/weighingRecord/selectById`, 'get', params || {})
}

//称重记录编辑
export function editWeightDetail(params) {
    return request(`api/weighingRecord/update`, 'post', params || {})
}

//根据类型以及型号查询详细
export function getSelectInfo(params) {
    return request(`api/cableType/selectInfo`, 'get', params || {})
}

//获取单位转化数据
export function getUnitConversion(params) {
    return request(`api/unitConversion/getUnitConversionAll`, 'get', params || {})
}





